package User.bo.impl;

import User.bo.UserBo;
import User.dao.UserDao;
import User.model.User;

import java.util.List;

/**
 * Created by Новак on 21.11.2014.
 */
public class UserBoImpl implements UserBo {
    UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }


    public void save(User user) {
        userDao.save(user);
    }


    public void update(User user) {
        userDao.update(user);
    }


    public void delete(User user) {
        userDao.delete(user);
    }


    public User getUserByLogin(String login, String pass) {
        return userDao.getUserByLogin(login,pass);
    }

    @Override
    public List getAllUser() {
        return userDao.getAllUser();
    }

    @Override
    public  boolean checkLogin(String login) {
        return userDao.checkLogin(login);
    }
}
